only show checkbox if there are circles

stvnrlly 10 years ago
parent
commit
a297d80802
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/views/agents/agent_views/user_location_agent/_show.html.erb

+ 4 - 1
app/views/agents/agent_views/user_location_agent/_show.html.erb

@@ -47,6 +47,9 @@
47 47
                 Visibility(points, map);
48 48
             }
49 49
         });
50
+        if(circles.length > 0){
51
+            $(".checkbox").removeClass("hidden");
52
+        }
50 53
     });
51 54
 
52 55
   </script>
@@ -56,7 +59,7 @@
56 59
   </p>
57 60
 <% end %>
58 61
 
59
-<div class="checkbox">
62
+<div class="hidden checkbox">
60 63
     <label>
61 64
         <input id="toggle" type="checkbox" value="">
62 65
         Show accuracy of locations